package com.techstar.ats.utils;

import java.util.HashMap;
import java.util.Map;

import com.techstar.ats.netty.AtsNettyClient;

public class NettyBeanHelper {
	private static final Map<Integer, AtsNettyClient> atsNettyBeans = new HashMap<>();

	public static void put(int line, AtsNettyClient netty) {
		atsNettyBeans.put(line, netty);
	}

	public static AtsNettyClient get(int line) {
		return atsNettyBeans.get(line);
	}

	public static boolean send(int line, Object msg) {
		return false;
//		if(null == atsNettyBeans.get(line)) {
//			return false;
//		} else {
//			Channel channel = atsNettyBeans.get(line)
//				.getChannel();
//			if(null == channel) {
//				return false;
//			} else {
//				ChannelHandlerContext ctx = channel.pipeline()
//					.lastContext();
//				ctx.write(msg);
//				return true;
//			}
//		}
	}
}
